import request from '../util/request'
export const getList = params => {
  return request({
    url: '/data',
    method: 'GET',
    params
  })
}
export function addTaskList(data) {
  return request({
    url: '/data',
    method: 'POST',
    data
  })
}
export function getTaskDetail(id) {
  return request({
    url: `/data/${id}`
  })
}
export function updateTaskList(data) {
  return request({
    url: `/data/${data.id}`,
    method: 'PUT',
    data
  })
}
export function deleteTaskList(id) {
  return request({
    url: `/data/${id}`,
    method: 'DELETE'
  })
}

export function findTaskList(value) {
  return request({
    url: `data/?name=${value}`,
    method: 'GET'
  })
}
